package com.boscloud.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.boscloud.pojo.MoveLocationInfo;
import com.boscloud.pojo.PostGoodMvtResult;
import com.boscloud.pojo.StorageLocation;
import com.boscloud.pojo.RecycleToneSlotsPost;
import com.boscloud.service.RecycleToneSlotsPostServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.boscloud.service.StorageLocationService;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@CrossOrigin //允许跨域
@RestController

public class RecycleToneSlotsPostController {
    @Autowired
    private RecycleToneSlotsPostServices RecycleToneSlotsPostServices;
    @PostMapping("/RecycleToneSlotsPost")//吨槽回收
    public List<PostGoodMvtResult> PostRecycleToneSlotsPost(@RequestBody RecycleToneSlotsPost RecycleToneSlotsPost) throws IOException {
        Map<String, String> headers = new HashMap<String, String>();
        headers.put("PORTID","ITMS013");//接口ID
        //System.out.println(JSON.toJSONString(MoveLocationInfo));
        Map<String, Object> params  = JSONObject.parseObject(JSON.toJSONString(RecycleToneSlotsPost));
//        System.out.println(RecycleToneSlotsPost);
        return RecycleToneSlotsPostServices.postRecycleToneSlotsPost(params,headers);
    }



}